<template>
  <div class="expired-container">
    <!-- 品牌装饰背景 -->
    <div class="brand-decoration"></div>

    <!-- 页面头部 -->
    <div class="header">
      <div class="brand-logo">
        <span>COKFOOD</span>
      </div>
      <h1>Order Status</h1>
      <p>We're here to help with your food ordering experience</p>
    </div>

    <!-- 订单过期状态卡片 -->
    <div class="status-card fade-in">
      <div class="status-icon-container">
        <div class="status-icon">
          <div class="clock-icon">⏰</div>
          <div class="expired-badge">Expired</div>
        </div>
      </div>

      <div class="status-content">
        <h2 class="status-title">Order Has Expired</h2>
        <p class="status-message">
          Sorry, this payment link has expired. The limited-time offer was only available for a short period to ensure fresh food delivery.
        </p>
      </div>
    </div>

    <!-- 详细信息卡片 -->
    <div class="info-card fade-in" style="animation-delay: 0.2s;">
      <div class="info-header">
        <div class="info-icon">💡</div>
        <h3>What happened?</h3>
      </div>
      <div class="info-content">
        <div class="info-item">
          <span class="info-bullet">•</span>
          <span>Payment links expire to ensure food freshness and optimal delivery times</span>
        </div>
        <div class="info-item">
          <span class="info-bullet">•</span>
          <span>This helps us maintain the highest quality standards for our customers</span>
        </div>
        <div class="info-item">
          <span class="info-bullet">•</span>
          <span>Restaurant preparation schedules are optimized for timely delivery</span>
        </div>
      </div>
    </div>


    <!-- 底部装饰 -->
    <div class="bottom-decoration">
      <div class="decoration-text">Thank you for choosing COKFOOD</div>
    </div>
  </div>
</template>

<script lang='ts' setup>
import { useRouter } from 'vue-router'

const router = useRouter()

const contactSupport = () => {
  // 打开客服聊天
  console.log('Opening live chat...')
}

const callSupport = () => {
  // 拨打客服电话
  window.open('tel:+1234567890')
}
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.expired-container {
  max-width: 430px;
  margin: 0 auto;
  background-color: #FFFFFF;
  min-height: 100vh;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
}

/* 品牌装饰背景 */
.brand-decoration {
  position: absolute;
  width: 100%;
  height: 280px;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  overflow: hidden;
  z-index: 0;
}

.brand-decoration::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  top: -50%;
  right: -50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

.brand-decoration::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23FFFFFF' fill-opacity='1' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* 页面头部 */
.header {
  position: relative;
  padding: 40px 20px 80px;
  text-align: center;
  color: white;
  z-index: 1;
}

.brand-logo {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.brand-logo span {
  background: linear-gradient(45deg, #FFFFFF 30%, #FEE2E2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header h1 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header p {
  font-size: 15px;
  opacity: 0.95;
  font-weight: 300;
}

/* 订单过期状态卡片 */
.status-card {
  margin: -40px 20px 30px;
  padding: 30px;
  background: linear-gradient(135deg, #FFFBFB 0%, #FEF5F5 100%);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.15);
  position: relative;
  overflow: hidden;
  z-index: 2;
  border: 1px solid rgba(239, 68, 68, 0.1);
  text-align: center;
}

.status-icon-container {
  margin-bottom: 20px;
}

.status-icon {
  position: relative;
  display: inline-block;
}

.clock-icon {
  font-size: 80px;
  margin-bottom: 10px;
  animation: swing 2s ease-in-out infinite;
}

@keyframes swing {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(10deg); }
}

.expired-badge {
  position: absolute;
  top: -5px;
  right: -15px;
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.status-title {
  font-size: 24px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 15px;
}

.status-message {
  font-size: 16px;
  color: #6B7280;
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

/* 详细信息卡片 */
.info-card {
  margin: 0 20px 30px;
  padding: 25px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #F3F4F6;
}

.info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.info-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1F2937;
}

.info-content {
  space-y: 12px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #6B7280;
  line-height: 1.5;
}

.info-bullet {
  color: #EF4444;
  font-weight: 600;
  margin-top: 2px;
}

/* 支持信息卡片 */
.support-card {
  margin: 0 20px 30px;
  padding: 25px;
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #D1FAE5;
}

.support-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.support-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #10B981, #059669);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.support-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #1F2937;
}

.support-text {
  font-size: 14px;
  color: #6B7280;
  line-height: 1.5;
  margin-bottom: 20px;
}

.support-actions {
  display: flex;
  gap: 12px;
}

.support-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid #D1FAE5;
  border-radius: 12px;
  color: #059669;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.support-btn:hover {
  background: #F0FDF4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* 底部装饰 */
.bottom-decoration {
  text-align: center;
  padding: 30px 20px;
  color: #9CA3AF;
}

.decoration-text {
  font-size: 14px;
  font-weight: 500;
}

/* 动画效果 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

/* 响应式设计 */
@media (max-width: 430px) {
  .expired-container {
    box-shadow: none;
  }

  .status-card,
  .info-card,
  .support-card {
    margin-left: 16px;
    margin-right: 16px;
  }
}
</style>
